package com.fyh.feign;

import com.fyh.entity.common.Result;
import com.fyh.entity.community.PostVO;
import com.fyh.entity.community.ReplyVO;
import com.fyh.feign.fallback.CommunityUserFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(name = "service-user", fallback = CommunityUserFeignClientFallback.class, path = "/user")
public interface CommunityUserFeignClient {

    /**
     * 补全用户昵称和用户头像文件路径（用于帖子列表）
     *
     * @param postVOList
     * @return
     */
    @PostMapping("/selectNicknameAndAvaterPathForPost")
    Result<List<PostVO>> selectNicknameAndAvaterPathForPost(@RequestBody List<PostVO> postVOList);

    /**
     * 补全用户昵称和用户头像文件路径（用于回复列表）
     *
     * @param ReplyVOList
     * @return
     */
    @PostMapping("/selectNicknameAndAvaterPathForReply")
    Result<List<ReplyVO>> selectNicknameAndAvaterPathForReply(@RequestBody List<ReplyVO> ReplyVOList);
}
